<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>simple</title>
        <style>
            .target{
                width: 400px;
                height: 400px;
                background-color: bisque;
                margin-left: 200px;
            }
            .total{
                width: 100%;
                /* 100 vh  visible height */
                height: 100vh; 
                background-color: green;
                display: flex;
                /* 大布局优先竖着考虑 */
                flex-direction: column;
                /*  */
                justify-content: center;
                align-items:center;
            }
            body{
                margin: 0;
                /* padding: 0; */
            }
        </style>
    </head>
    <body>
        <div class="total">
            <div class="target"></div>
        </div>
    </body>
</html>